package bb.lanxing.lib.devices.sprint.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class BikeSettings implements Parcelable {
    public static final Parcelable.Creator<BikeSettings> CREATOR = new Parcelable.Creator<BikeSettings>() {
        @Override
        public BikeSettings createFromParcel(Parcel parcel) {
            return new BikeSettings(parcel);
        }

        @Override
        public BikeSettings[] newArray(int i) {
            return new BikeSettings[i];
        }
    };
    private String name;
    private SprintDecimal weight;
    private int wheelsize;

    @Override
    public int describeContents() {
        return 0;
    }

    public BikeSettings() {
    }

    public BikeSettings(BikeSettings bikeSettings) {
        this.name = bikeSettings.name;
        this.weight = bikeSettings.weight;
        this.wheelsize = bikeSettings.wheelsize;
    }

    protected BikeSettings(Parcel parcel) {
        this.name = parcel.readString();
        this.weight = (SprintDecimal) parcel.readParcelable(SprintDecimal.class.getClassLoader());
        this.wheelsize = parcel.readInt();
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.name);
        parcel.writeParcelable(this.weight, i);
        parcel.writeInt(this.wheelsize);
    }

    public String getName() {
        return this.name;
    }

    public void setName(String str) {
        this.name = str;
    }

    public SprintDecimal getWeight() {
        return this.weight;
    }

    public void setWeight(SprintDecimal sprintDecimal) {
        this.weight = sprintDecimal;
    }

    public int getWheelsize() {
        return this.wheelsize;
    }

    public void setWheelsize(int i) {
        this.wheelsize = i;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        BikeSettings bikeSettings = (BikeSettings) obj;
        if (this.wheelsize != bikeSettings.wheelsize) {
            return false;
        }
        String str = this.name;
        if (str == null ? bikeSettings.name != null : !str.equals(bikeSettings.name)) {
            return false;
        }
        SprintDecimal sprintDecimal = this.weight;
        SprintDecimal sprintDecimal2 = bikeSettings.weight;
        return sprintDecimal != null ? sprintDecimal.equals(sprintDecimal2) : sprintDecimal2 == null;
    }

    public int hashCode() {
        String str = this.name;
        int i = 0;
        int hashCode = (str != null ? str.hashCode() : 0) * 31;
        SprintDecimal sprintDecimal = this.weight;
        if (sprintDecimal != null) {
            i = sprintDecimal.hashCode();
        }
        return ((hashCode + i) * 31) + this.wheelsize;
    }
}
